'''
Get File List And File Category From Info.csv
'''

import config
import csv
# from random import shuffle

path = config.global_var.path

def get_file_and_category(info_file):
    file_list = []
    category = {}
    with open(path+info_file, "r", encoding="UTF-8") as f:
        reader = csv.reader(f)
        headers = next(reader)
        for row in reader:
            category[row[1]] = row[0]
            file_list.append(row[1])
    #shuffle(file_list)

    return file_list, category

'''
user, file, category = get_file_and_category('info.csv')
print(file[0], file[1], file[2])
print(category[file[0]], category[file[1]], category[file[2]])
print(len(file))

print(len(user))
print(user[0])
'''